<template>
	<view class="page">
		<view class="nav nav-wrap">
			<view class="section__title" :class="selected?'yellow':'default'" @tap="selectedFn">场景</view>
			<view class="section__title" :class="selected1?'yellow':'default'" @tap="selected1Fn">分类</view>
		</view>

		<view :class="selected?'show':'hidden'">
			<view class="schoollist">
				<view class="school-list">
					<block v-for="(item,i) in items" :key="i">
						<view class="school-list-item">
							<block v-for="(item_k,k) in 2" :key="k">
								<view v-if="items[i+k] != null && i%2 == 0 " class="school-list-info" :class="!isVerticalScreen ? 'img-size':''" :data-scenes="items[i+k]" :data-index="i+k"
								 @tap="chooseScenes">
									<!-- <image :id="'img'+items[i+k].kid" :class="showId == items[i+k].kid ? 'school-list-photo-Selected':'school-list-photo'"
									 :src="'data:image/png;base64,'+items[i+k].imageContent" /> -->
									<image :id="'img'+items[i+k].kid" :class="showId == items[i+k].kid ? 'school-list-photo-Selected':'school-list-photo'"
									 :src="items[i+k].imageContent" />
									<view v-if="items[i+k].state != 1" class="school-list-photo school-list-photo-up">
										<text class="school-list-notLoad">{{items[i+k].state == 0 ?'未下载' : '下载中'}}</text>
									</view>
									<text class="school-list-desc">{{items[i+k].name}}</text>
								</view>
							</block>
						</view>
					</block>
				</view>
			</view>
		</view>

		<view :class="selected1?'show':'hidden'">
			<view class="schoollist">
				<view class="school-list">
					<radio-group class="radio-group" @change="chooseClassify">
						<radio class="radio" v-for="(item,index) in classifyItems" :key="index" :data-fuseClassifyLabel="item.fuseClassifyLabel"
						 :value="item.name" :checked="item.checked">
							<text>{{item.name}}</text>
						</radio>
					</radio-group>
				</view>
			</view>
		</view>
		<!-- 互动 -->
		<hudong ref="hudong" :hudongIp="hudongIp"></hudong>
		<!-- 密码校验 -->
		<check-pwd ref="pwd" :localServerIP="localIP"></check-pwd>
		<!-- 控制 -->
		<e-control ref="control"></e-control>
		<!-- 关于 -->
		<about-us ref="about"></about-us>
		<!-- 功能悬浮球 -->
		<!--bindmenuItemClick为按钮点击的时候的回调方法  mainmodel是显示的按钮，menulist为折叠的菜单的数组数据-->
		<movemenu @menuItemClick="menuItemClick"></movemenu>
	</view>
</template>

<script>
	const app = getApp()
	import http from '../../utils/http.js'
	import websocket from '../../utils/websocket.js';
	import utils from '../../utils/util.js';
	import hudong from '../../components/hudong/index.vue'
	import eControl from '../../components/control/index.vue'
	import aboutUs from '../../components/about/index.vue'
	import movemenu from '../../components/movemenu/movemenu.vue'
	import checkPwd from '../../components/checkPwd/index.vue'
	var page = 1;
	var hadLastPage = false;
	var localsrcs = [];
	var cloundLists = [];
	var timer = null;
	var sceneId = '';
	export default {
		components: {
			hudong,
			aboutUs,
			eControl,
			movemenu,
			checkPwd
		},
		data() {
			return {
				items: [],
				newslist: [],
				scrollTop: 0,
				increase: false, //图片添加区域隐藏
				aniStyle: true, //动画效果
				message: "",
				previewImgList: [],
				ip: "",
				itemsIndex: 0,
				showId: '',
				notScanCode: true,
				state: "-1",
				selected: true,
				selected1: false,
				classifyItems: [],
				fuseClassifyLabel: '',
				localIP: '',
				hudongIp: '',
				isVerticalScreen:true,//是否是竖屏状态
			}
		},
		/**
		 * 生命周期函数--监听页面加载
		 */
		onLoad: function(options) {},
		onShow: function() {
			console.log('onShow');
			// console.log(app.globalData.userInfo);
			// this.createConnect();
			// uni.showLoading({
			// 	title: '加载中...',
			// 	// mask: true
			// })

		},
		onHide: function() {
			console.log("onhide");
			// clearInterval(timer);
			// uni.closeSocket();
		},
		onUnload: function() {
			console.log("onUnload");
			// clearInterval(timer);
			// uni.closeSocket();
		},
		// 页面卸载
		onUnload() {
			console.log("onUnload");
			// clearInterval(timer);
			// uni.closeSocket();
		},
		created() {
			this.createConnect();
			uni.showLoading({
				title: '加载中...',
				// mask: true
			})
		},
		mounted() {

		},
		methods: {
			onResize() {//获取横竖屏状态
				uni.getSystemInfo({
					success: (res) =>{
						// console.log(res.windowWidth);
						// console.log(res.windowHeight);
						if (res.windowWidth > res.windowHeight) {
							// console.log('横屏');
							this.isVerticalScreen = false;
						} else {
							// console.log('竖屏');
							this.isVerticalScreen = true;
						}
					}
				});
			},
			setData(obj) { //转换this.xxx = xxxx
				const keys = Object.keys(obj);
				keys.forEach((key) => {
					this[key] = obj[key];
				});
			},
			selectedFn: function(e) {
				this.setData({
					selected: true,
					selected1: false
				});
				this.createConnect(); //全部场景
			},
			selected1Fn: function(e) {
				this.setData({
					selected: false,
					selected1: true,
				});
			},
			createConnect: function() {
				page = 1;
				hadLastPage = false;

				var connectData = utils.getStor('connectData') || '';
				if (connectData == '' || connectData == undefined) {
					this.setData({
						items: []
					});
					if (this.notScanCode) {
						uni.showToast({
							title: '登录可能已过期,请尝试重新扫码登录~',
							icon: "none",
							duration: 2000
						});
					}
					this.setData({
						notScanCode: true
					});
					return;
				}
				this.setData({
					ip: connectData
				});

				//获取分类
				let dataMsg = {
					"command": "getAllClassify",
					"mubuIndex": String(app.globalData.mubuIndex)
				}

				http.httpRequest(dataMsg).then(res => {
					console.log(res, 'http获取到的数据');
					this.returnResult(res)
				}, error => {
					console.log(error);
				})

				this.getScenes();
			},
			getScenes: function() {
				// 显示加载图标
				uni.showNavigationBarLoading();

				if (hadLastPage != false) {
					uni.hideNavigationBarLoading();
					uni.showToast({
						title: '没有加载的数据了',
						icon: 'none'
					});
					return;
				}

				// console.log('默认获取全部数据：');
				var data = {};
				data.command = "getsrc";
				data.type = '2'; //1-素材、2-场景、3-霸屏、
				data.classify = String(app.globalData.classifyId); //-1-代表全部、注意：霸屏时填写-1
				data.current = String(page); //请求第几页数据
				data.size = '8'; //每页请求数量
				data.state = '-1'; //-1-全部、0-未下载、1-已下载、
				data.mubuIndex = String(app.globalData.mubuIndex); //幕布索引
				data.dataStatus = '0'; //资源删除状态：-1-删除、0-正常、1-全部
				data.searchCondition = ''; //按照名称或编号模糊查询
				console.log(data, 'getsrc');
				// websocket.send(JSON.stringify(data));
				http.httpRequest(data).then(res => {
					this.returnResult(res)
				}, error => {
					console.log(error);
				})
			},
			// 选中场景
			chooseScenes: function(e) {
				var scenes = e.currentTarget.dataset.scenes;

				// console.log(scenes, '选中场景')
				var itemsIndex = e.currentTarget.dataset.index;
				this.setData({
					itemsIndex: itemsIndex,
					showId: scenes.kid
				});

				if (scenes.state == 0) {
					//未下载，先下载
					var data = {};
					data.command = "changresstate";
					data.id = String(scenes.kid);
					data.type = "2";
					data.mubuIndex = String(app.globalData.mubuIndex)
					// console.log(data, '下载场景');
					// websocket.send(JSON.stringify(data));
					http.httpRequest(data).then(res => {
						uni.showToast({
							title: '下载中,请稍后...',
							icon: "none",
							duration: 2000
						})
						setTimeout(() => {
							this.returnResult(res)
						}, 1000)
					}, error => {
						console.log(error);
					})
				} else if (scenes.state == 1) {
					var data = {
						command: "playscence",
						mubuIndex: String(app.globalData.mubuIndex),
						no: String(scenes.no),
						windows: String(scenes.windows),
						fuseClassifyLabel: String(scenes.fuseClassifyLabel)
					};

					// console.log(data, "播放场景");
					if ((app.globalData.type == 2 && app.globalData.id != scenes.kid) || (app.globalData.type != 2)) {
						sceneId = scenes.id;
						// websocket.send(JSON.stringify(data));
						http.httpRequest(data).then(res => {
							this.returnResult(res)
						}, error => {
							console.log(error);
						})
					} else {
						var olddate = app.globalData.olddate;
						var nowdate = new Date().getTime();
						var diff = nowdate - olddate;
						// console.log('nowdate:' + nowdate);
						// console.log('olddate:' + olddate);
						// console.log('diff:' + diff);
						if (diff > 3000) {
							sceneId = scenes.id;
							// websocket.send(JSON.stringify(data));
							http.httpRequest(data).then(res => {
								this.returnResult(res)
							}, error => {
								console.log(error);
							})
						}
					}
				} else {
					//下载中
					uni.showToast({
						title: '下载中,请稍后...',
						icon: "none",
						duration: 2000
					})
				}
			},
			chooseClassify: function(e) {
				// console.log(e, '分类')
				var classifyName = e.detail.value;
				// console.log("分类名称：" + classifyName);
				// console.log(this.fuseClassifyLabel, 'fuseClassifyLabel')
				if (classifyName) {
					var data = { //更改后
						command: "playMaterial",
						mubuIndex: String(app.globalData.mubuIndex),
						classifyLabel: String(classifyName),
					};
					// console.log(data, "分类名称");
					// websocket.send(JSON.stringify(data));
					http.httpRequest(data).then(res => {
						this.returnResult(res)
					}, error => {
						console.log(error);
					})
				}
			},
			returnResult(res) {
				let that = this;
				// console.log(res,'res')
				// var jsonObj = JSON.parse(res.data);
				
				if (res == undefined) {
					// console.log('执行了');
					uni.showToast({
						title: '登录可能已过期,请尝试重新扫码登录~',
						icon: "none",
						duration: 2000
					});
					return false;
				}
				
				if (res.data != undefined) {
					var jsonObj = res.data;
					console.log(jsonObj, '收到服务器内容');

					if (jsonObj.command == "changresstate" && jsonObj.type == 2) {
						var id = jsonObj.id;
						var data = that.items;
						// console.log(id);
						// console.log(data);
						for (let i = 0; i < data.length; i++) {
							if (data[i].kid == id) {
								var state = 'items[' + i + '].state';
								if (jsonObj.state == 1) {
									setTimeout(() => {
										data[i].state = jsonObj.state
									}, 1500);
								} else {
									data[i].state = jsonObj.state
								}
								break;
							}
						}
					}

					if (jsonObj.command == "sendctrl") {
						if (jsonObj.result == "FAILED") {
							utils.showErrorMsgFun(jsonObj);
						}
					}

					if (jsonObj.command == "login") {
						uni.hideLoading()
						if (jsonObj.result == "SUCCESS") {
							// that.getScenes();
						} else {
							utils.showErrorMsgFun(jsonObj);
						}
					}
					if (jsonObj.command == "getsrc") {
						uni.hideLoading();
						if (jsonObj.result == "SUCCESS") {
							if (jsonObj.datas != undefined) {
								var data = jsonObj.datas;
								var item = page > 1 ? that.items : [];
								// console.log(data);
								// console.log(item);
								data.forEach((items, index, arr) => {
									if (items.imageContent != undefined) {
										var base64 = items.imageContent;
										if (base64 != null) {
											items.imageContent = base64.replace(/[\r\n]/g, "");
										}
									}
									item.push(items);

								});
								// console.log(item);
								that.setData({
									items: item
								});
								if (data.length > 0) {
									page++;
								} else {
									hadLastPage = true;
								}
								uni.hideNavigationBarLoading();
								// return;
							}
						} else if (jsonObj.result == "FAILED") {
							utils.showErrorMsgFun(jsonObj);
						}
					}
					if (jsonObj.command == "playscence") {
						if (jsonObj.result == "FAILED") {
							utils.showErrorMsgFun(jsonObj);
						} else {
							app.globalData.olddate = new Date().getTime();
							app.globalData.type = 2;
							app.globalData.id = sceneId;
						}
					}

					if (jsonObj.command == "getAllClassify") {
						if (jsonObj.result == "SUCCESS") {
							let classify = []
							let items = []
							if (jsonObj.datas != undefined) {
								var arr = jsonObj.datas;
								classify = arr.map((item) => {
									let json = {};
									json.id = item.classify;
									json.name = item.classifyName;
									return json;
								});
								classify.forEach((item, classify) => {
									items.push(item);
								})
								// console.log(items);
								that.setData({
									classifyItems: classify,
									fuseClassifyLabel: jsonObj.mubuConf
								})
								app.globalData.fuseClassifyLabel = jsonObj.mubuConf
							}
						}

					}
					//互动服务器
					if (jsonObj.command == "hudong" && jsonObj.result == 'SUCCESS') {
						uni.showToast({
							title: '操作成功～',
							icon: 'none'
						})
					}
				} 
				
			},
			menuItemSendHttp(data) { //搜索菜单发送请求
				http.httpRequest(data).then(res => {
					// console.log(res,'http获取到的数据');
					this.returnResult(res)
				}, error => {
					console.log(error);
				})
			},
			menuItemClick: function(res) {
				// console.log(res, '--------res-------')
				//获取点击事件的信息
				let clickInfo = res;
				// console.log(clickInfo);
				// 根据不同类型进行判别处理
				//事件的处理 代码
				switch (clickInfo.id) {
					case "1":
						// websocket.send('{ "command": "vol","mubuIndex":' + Number(app.globalData.mubuIndex) + ',"type":0,"ctl":0}');
						let volUp = {
							command: "vol",
							mubuIndex: String(app.globalData.mubuIndex),
							type: '0',
							ctl: '0'
						}
						this.menuItemSendHttp(volUp);
						break;
					case "2":
						// websocket.send('{ "command": "vol","mubuIndex":' + Number(app.globalData.mubuIndex) + ',"type":0,"ctl":1}');
						let volDown = {
							command: "vol",
							mubuIndex: String(app.globalData.mubuIndex),
							type: '0',
							ctl: '1'
						}
						this.menuItemSendHttp(volDown);
						break;
					case "3":
						if (clickInfo.isPlayVideo) { //播放
							// websocket.send('{ "command": "vol","mubuIndex":' + Number(app.globalData.mubuIndex) + ',"type":1,"ctl":1}');
							let play = {
								command: "vol",
								mubuIndex: String(app.globalData.mubuIndex),
								type: '1',
								ctl: '1'
							}
							this.menuItemSendHttp(play);
						} else { //暂停
							// websocket.send('{ "command": "vol","mubuIndex":' + Number(app.globalData.mubuIndex) + ',"type":1,"ctl":0}');
							let pause = {
								command: "vol",
								mubuIndex: String(app.globalData.mubuIndex),
								type: '1',
								ctl: '0'
							}
							this.menuItemSendHttp(pause);
						}
						break;
					case "5":
						// websocket.send('{ "command": "sendctrl","v":"43","d":{"k1":' + app.globalData.mubuIndex + ',"k2":1}}');
						let pause = {
							command: "sendctrl",
							v: '43',
							d: JSON.stringify({
								k1: String(app.globalData.mubuIndex),
								k2: '1'
							})
						}
						this.menuItemSendHttp(pause);
						break;
					case "6":
						this.setData({
							notScanCode: false
						});

						//#ifdef MP-WEIXIN
						app.globalData.loginType = 0;
						//#endif 

						//#ifdef APP-PLUS
						app.globalData.loginType = 1;
						//#endif 

						uni.scanCode({
							success: (res) => {
								let arr = [];
								if(res.result.indexOf("http://mp2")==0){
									arr = res.result.split("=")[1].split(",");
								}else{
									arr = res.result.split(",");
								}
								console.log(arr);
								if (arr.length > 1) {
									app.globalData.mubuIndex = arr[1];
									utils.setStor('connectData', arr[0]);
									uni.setStorageSync('mubuIndex', arr[1]);

								} else {
									app.globalData.mubuIndex = 0;
									utils.setStor('connectData', arr);
									uni.setStorageSync('mubuIndex', 0);
								}
								this.setData({
									ip: utils.getStor('connectData'),
									items: []
								});
								// uni.closeSocket()
								this.createConnect();
							},
							fail: (res) => {
								uni.showToast({
									title: '扫码失败~',
									icon: 'none',
									duration: 2000
								})
							},
							complete: (res) => {}
						});
						break;
					case "7":
						if (app.globalData.mainMubuNo == 1) {
							uni.showToast({
								title: '暂无操作权限~',
								icon: 'none'
							})
						} else {
							// websocket.send('{ "command": "sendctrl","v":"43","d":{"k1":' + app.globalData.mubuIndex + ',"k2":0}}');
							let bg = {
								command: "sendctrl",
								v: '43',
								d: JSON.stringify({
									k1: String(app.globalData.mubuIndex),
									k2: '0'
								})
							}
							this.menuItemSendHttp(bg);
						}
						break;
					case "8": //控制按钮
						// this.$refs.control.pwdDialog = 'checkPwd'
						// this.$refs.control.isShowSelectOpt = true
						let serverIP = '';
						//#ifdef MP-WEIXIN
						uni.showToast({
							title: '暂时无法使用~',
							icon: 'none'
						})
						// this.$refs.pwd.pwdDialog = 'Modal'
						// serverIP = uni.getStorageSync('zkLocalIP') || '';

						// if(serverIP == '' || serverIP == undefined){
						// 	this.localIP = serverIP
						// }else{
						// 	this.localIP = serverIP
						// }
						//#endif 

						//#ifdef APP-PLUS
						this.$refs.pwd.pwdDialog = 'Modal'
						serverIP = uni.getStorageSync('zkLocalIP') || '';
						if (serverIP == '' || serverIP == undefined) {
							this.localIP = serverIP
						} else {
							this.localIP = serverIP
						}
						//#endif 
						break;
					case "9": //互动
						this.$refs.hudong.modalName = 'modal'
						this.hudongIp = uni.getStorageSync('hudongIp') || '';
						break;
					case "10": //关于
						this.$refs.about.modalName = 'modal'
						break;
				}
			},
		},
		/**
		 * 页面相关事件处理函数--监听用户下拉动作
		 */
		onPullDownRefresh: function() {
			console.log("执行下拉");
			// 显示顶部刷新图标
			uni.showNavigationBarLoading();
			page = 1;
			hadLastPage = false;
			this.setData({
				items: []
			});
			this.getScenes();

			// 隐藏导航栏加载框
			uni.hideNavigationBarLoading();

			uni.stopPullDownRefresh();

			uni.showLoading({
				title: '加载中...',
				// mask: true
			})
		},

		/**
		 * 页面上拉触底事件的处理函数
		 */
		onReachBottom: function() {
			console.log("执行上拉");
			this.getScenes();
		},
	}
</script>

<style>
	/* page {
		background-color: #313247;
	} */
</style>
<style scoped>
	.nav {
		width: 100%;
		height: 90rpx;
		display: flex;
		flex-direction: row;
		color: #ffffff;
		background-color: #3A3A52;
		position: fixed;
		top: 0rpx;
		z-index: 23;
	}

	.section__title {
		z-index: 2;
		font-size: 20px;
		color: #fff;
	}

	.schoollist {
		padding-top: 98rpx;
		padding-bottom: 150rpx;
	}

	.school-list-item,
	.checkbox-group-item {
		background-color: #3A3A52;
		width: 100%;
		margin-top: 10rpx;
		margin-bottom: 20rpx;
		display: flex;
		flex-wrap: nowrap;
	}

	.school-list-info {
		position: relative;
		width: 40%;
		margin: 40rpx 40rpx 20rpx 40rpx;
		border-radius: 8rpx;
		text-align: center;
	}

	.school-list-photo,
	.school-list-photo-Selected {
		width: 100%;
		height: 180rpx;
		border-radius: 8rpx;
		vertical-align: middle;
		border: 4rpx solid #666;
		box-sizing: border-box;
	}

	.school-list-photo-Selected {
		border: 4rpx solid #ffe570;
	}

	.school-list-photo-up {
		position: absolute;
		z-index: 2;
		top: 0;
		left: 0;
		background: rgba(0, 0, 0, 0.6);
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.school-list-notLoad {
		color: #fff;
		font-size: 30rpx;
	}

	.school-list-desc {
		display: block;
		color: #fff;
		text-align: center;
		font-size: 25rpx;
		padding: 10rpx;
	}

	.default {
		line-height: 90rpx;
		text-align: center;
		flex: 1;
		color: #fff;
		font-size: 20px;
	}

	.yellow {
		line-height: 90rpx;
		text-align: center;
		color: #FFE570;
		flex: 1;
		font-size: 20px;
	}

	.show {
		display: block;
		widows: 750rpx;
	}

	.hidden {
		display: none;
		widows: 750rpx;
	}

	.radio-group {
		padding: 40rpx;
	}

	.radio {
		font-size: 40rpx;
		color: #ffffff;
		padding: 20rpx;
	}
	
	.img-size .school-list-photo,.img-size .school-list-photo-Selected {
		/* height: 220rpx !important; */
	}
	
	@media screen and (min-width: 769px) {
		.nav {
			height: 60rpx !important;
		}
		
		.nav view {
			font-size: 20px !important;
			line-height: 60rpx !important;
		}
		
		.nav .default {
			line-height: 60rpx !important;
		}
		
		.school-list-item {
			margin-bottom: 0 !important;
		}
		
		.img-size .school-list-photo,.img-size .school-list-photo-Selected {
			height: 220rpx !important;
		}
		
		.schoollist {
			padding-top: 68rpx !important;
		}
		
		.school-list-info {
			width: 45% !important;
			margin: 30rpx 30rpx 10rpx 30rpx !important;
		}
	}
	
	@media screen and (min-device-width: 641px) and (max-device-width: 768px) {
		.nav {
			height: 60rpx !important;
		}
	
		.nav view {
			font-size: 20px !important;
			line-height: 60rpx !important;
		}
	
		.nav .default {
			line-height: 60rpx !important;
		}
	
		.school-list-item {
			margin-bottom: 0 !important;
		}
	
		.img-size .school-list-photo,.img-size .school-list-photo-Selected {
			height: 220rpx !important;
		}
	
		.schoollist {
			padding-top: 68rpx !important;
		}
	
		.school-list-info {
			width: 45% !important;
			margin: 30rpx 30rpx 10rpx 30rpx !important;
		}
	}
	
	@media screen and (min-device-width: 401px) and (max-device-width: 640px) {
		.nav {
			width: 100%;
			height: 90rpx;
			display: flex;
			flex-direction: row;
			color: #ffffff;
			background-color: #3A3A52;
			position: fixed;
			top: 0rpx;
			z-index: 23;
		}
		
		.section__title {
			z-index: 2;
			font-size: 20px;
			color: #fff;
		}
		
		.schoollist {
			padding-top: 98rpx;
			padding-bottom: 150rpx;
		}
		
		.school-list-item,
		.checkbox-group-item {
			background-color: #3A3A52;
			width: 100%;
			margin-top: 10rpx;
			margin-bottom: 20rpx;
			display: flex;
			flex-wrap: nowrap;
		}
		
		.school-list-info {
			position: relative;
			width: 40%;
			margin: 40rpx 40rpx 20rpx 40rpx;
			border-radius: 8rpx;
			text-align: center;
		}
		
		.school-list-photo,
		.school-list-photo-Selected {
			width: 100%;
			height: 180rpx;
			border-radius: 8rpx;
			vertical-align: middle;
			border: 4rpx solid #666;
			box-sizing: border-box;
		}
		
		.school-list-photo-Selected {
			border: 4rpx solid #ffe570;
		}
		
		.school-list-photo-up {
			position: absolute;
			z-index: 2;
			top: 0;
			left: 0;
			background: rgba(0, 0, 0, 0.6);
			display: flex;
			align-items: center;
			justify-content: center;
		}
		
		.school-list-notLoad {
			color: #fff;
			font-size: 30rpx;
		}
		
		.school-list-desc {
			display: block;
			color: #fff;
			text-align: center;
			font-size: 25rpx;
			padding: 10rpx;
		}
		
		.default {
			line-height: 90rpx;
			text-align: center;
			flex: 1;
			color: #fff;
			font-size: 20px;
		}
		
		.yellow {
			line-height: 90rpx;
			text-align: center;
			color: #FFE570;
			flex: 1;
			font-size: 20px;
		}
		
		.show {
			display: block;
			widows: 750rpx;
		}
		
		.hidden {
			display: none;
			widows: 750rpx;
		}
		
		.radio-group {
			padding: 40rpx;
		}
		
		.radio {
			font-size: 40rpx;
			color: #ffffff;
			padding: 20rpx;
		}
	}
	
	@media only screen and (max-device-width: 400px) {
		.nav {
			width: 100%;
			height: 90rpx;
			display: flex;
			flex-direction: row;
			color: #ffffff;
			background-color: #3A3A52;
			position: fixed;
			top: 0rpx;
			z-index: 23;
		}
		
		.section__title {
			z-index: 2;
			font-size: 20px;
			color: #fff;
		}
		
		.schoollist {
			padding-top: 98rpx;
			padding-bottom: 150rpx;
		}
		
		.school-list-item,
		.checkbox-group-item {
			background-color: #3A3A52;
			width: 100%;
			margin-top: 10rpx;
			margin-bottom: 20rpx;
			display: flex;
			flex-wrap: nowrap;
		}
		
		.school-list-info {
			position: relative;
			width: 40%;
			margin: 40rpx 40rpx 20rpx 40rpx;
			border-radius: 8rpx;
			text-align: center;
		}
		
		.school-list-photo,
		.school-list-photo-Selected {
			width: 100%;
			height: 180rpx;
			border-radius: 8rpx;
			vertical-align: middle;
			border: 4rpx solid #666;
			box-sizing: border-box;
		}
		
		.school-list-photo-Selected {
			border: 4rpx solid #ffe570;
		}
		
		.school-list-photo-up {
			position: absolute;
			z-index: 2;
			top: 0;
			left: 0;
			background: rgba(0, 0, 0, 0.6);
			display: flex;
			align-items: center;
			justify-content: center;
		}
		
		.school-list-notLoad {
			color: #fff;
			font-size: 30rpx;
		}
		
		.school-list-desc {
			display: block;
			color: #fff;
			text-align: center;
			font-size: 25rpx;
			padding: 10rpx;
		}
		
		.default {
			line-height: 90rpx;
			text-align: center;
			flex: 1;
			color: #fff;
			font-size: 20px;
		}
		
		.yellow {
			line-height: 90rpx;
			text-align: center;
			color: #FFE570;
			flex: 1;
			font-size: 20px;
		}
		
		.show {
			display: block;
			widows: 750rpx;
		}
		
		.hidden {
			display: none;
			widows: 750rpx;
		}
		
		.radio-group {
			padding: 40rpx;
		}
		
		.radio {
			font-size: 40rpx;
			color: #ffffff;
			padding: 20rpx;
		}
	}
</style>
